From 281018701f216e648f6065d202301458f0380265 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 15 Dec 2010 20:59:29 +0000 Subject: [PATCH] Changed doQuery() -> query() --- includes/installer/OracleInstaller.php | 2 +- includes/installer/OracleUpdater.php | 2 +- includes/installer/PostgresInstaller.php | 6 +++--- includes/installer/PostgresUpdater.php | 10 +++++----- includes/search/SearchPostgres.php | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php index d9bc098a0b..feb7e72f3d 100644 --- a/includes/installer/OracleInstaller.php +++ b/includes/installer/OracleInstaller.php @@ -195,7 +195,7 @@ class OracleInstaller extends DatabaseInstaller { public function createTables() { $status = parent::createTables(); - $this->db->doQuery( 'BEGIN fill_wiki_info; END;' ); + $this->db->query( 'BEGIN fill_wiki_info; END;' ); return $status; } diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index df46ba375d..a60c6686fe 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -93,7 +93,7 @@ class OracleUpdater extends DatabaseUpdater { public function doUpdates( $purge = true ) { parent::doUpdates(); - $this->db->doQuery( 'BEGIN fill_wiki_info; END;' ); + $this->db->query( 'BEGIN fill_wiki_info; END;' ); } } diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index 9d832f94ab..72e94e9e22 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -129,14 +129,14 @@ class PostgresInstaller extends DatabaseInstaller { $ctest = 'mediawiki_test_table'; $safeschema = $conn->addIdentifierQuotes( $schema ); if ( $conn->tableExists( $ctest, $schema ) ) { - $conn->doQuery( "DROP TABLE $safeschema.$ctest" ); + $conn->query( "DROP TABLE $safeschema.$ctest" ); } - $res = $conn->doQuery( "CREATE TABLE $safeschema.$ctest(a int)" ); + $res = $conn->query( "CREATE TABLE $safeschema.$ctest(a int)" ); if ( !$res ) { $status->fatal( 'config-install-pg-schema-failed', $this->getVar( 'wgDBuser'), $schema ); } - $conn->doQuery( "DROP TABLE $safeschema.$ctest" ); + $conn->query( "DROP TABLE $safeschema.$ctest" ); return $status; } diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index c6abcc3ff7..629ccba828 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -523,7 +523,7 @@ END; $safeuser = $this->db->addQuotes( $wgDBuser ); $SQL = "SELECT array_to_string(useconfig,'*') FROM pg_catalog.pg_user WHERE usename = $safeuser"; - $config = pg_fetch_result( $this->db->doQuery( $SQL ), 0, 0 ); + $config = pg_fetch_result( $this->db->query( $SQL ), 0, 0 ); $conf = array(); foreach ( explode( '*', $config ) as $c ) { list( $x, $y ) = explode( '=', $c ); @@ -546,8 +546,8 @@ END; } $search_path = str_replace( ', ,', ',', $search_path ); if ( array_key_exists( 'search_path', $conf ) === false || $search_path != $conf['search_path'] ) { - $this->db->doQuery( "ALTER USER $wgDBuser SET search_path = $search_path" ); - $this->db->doQuery( "SET search_path = $search_path" ); + $this->db->query( "ALTER USER $wgDBuser SET search_path = $search_path" ); + $this->db->query( "SET search_path = $search_path" ); } else { $path = $conf['search_path']; $this->output( "... search_path for user \"$wgDBuser\" looks correct ($path)\n" ); @@ -562,8 +562,8 @@ END; foreach ( $goodconf as $key => $value ) { if ( !array_key_exists( $key, $conf ) or $conf[$key] !== $value ) { $this->output( "Setting $key to '$value' for user \"$wgDBuser\"\n" ); - $this->db->doQuery( "ALTER USER $wgDBuser SET $key = '$value'" ); - $this->db->doQuery( "SET $key = '$value'" ); + $this->db->query( "ALTER USER $wgDBuser SET $key = '$value'" ); + $this->db->query( "SET $key = '$value'" ); } else { $this->output( "... default value of \"$key\" is correctly set to \"$value\" for user \"$wgDBuser\"\n" ); } diff --git a/includes/search/SearchPostgres.php b/includes/search/SearchPostgres.php index 8c9e2938e2..9d6d153988 100644 --- a/includes/search/SearchPostgres.php +++ b/includes/search/SearchPostgres.php @@ -148,7 +148,7 @@ class SearchPostgres extends SearchEngine { ## We need a separate query here so gin does not complain about empty searches $SQL = "SELECT to_tsquery($prefix $searchstring)"; - $res = $this->db->doQuery($SQL); + $res = $this->db->query($SQL); if (!$res) { ## TODO: Better output (example to catch: one 'two) die ("Sorry, that was not a valid search string. Please go back and try again"); @@ -206,7 +206,7 @@ class SearchPostgres extends SearchEngine { $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ". "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) . " ORDER BY rev_text_id DESC OFFSET 1)"; - $this->db->doQuery($SQL); + $this->db->query($SQL); return true; } -- 2.20.1